﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace VisionCloud.Core.Model.Ms
{
    [Table("MsTaskReport")]
    public class MsTaskReport : BaseEntity
    {
        [Key]
        [Column(TypeName = "uuid")]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid TaskReportId { get; set; }

        /// <summary>
        /// 机器人Id
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public string RobotId { get; set; }

        /// <summary>
        /// 项目Id
        /// </summary>
        [Column(TypeName = "uuid")]
        public Guid ProjectId { get; set; }

        /// <summary>
        /// TaskId
        /// </summary>
        [Column(TypeName = "uuid")]
        [Required]
        public Guid TaskId { get; set; }

        [Column(TypeName = "uuid")]
        [Required]
        public Guid FileId { get; set; }

        [Column(TypeName = "int4", Order = 1003)]
        public int ReportType { get; set; }

        [Column(TypeName = "varchar(256)", Order = 1000)]
        public string ReportName { get; set; }

        //[Required]
        //[Column(TypeName = "bool", Order = 999)]
        //public bool IsDeleted { get; set; }

        //[Column(TypeName = "varchar(64)", Order = 1000)]
        //public string CreatedBy { get; set; }

        //[Column(TypeName = "timestamp", Order = 1001)]
        //public DateTime CreatedDate { get; set; }

        //[Column(TypeName = "varchar(64)", Order = 1002)]
        //public string LastUpdatedBy { get; set; }

        //[Column(TypeName = "timestamp", Order = 1003)]
        //public DateTime LastUpdatedDate { get; set; }

        /// <summary>
        /// 数据报表存放路径
        /// </summary>
        [Column(TypeName = "varchar(500)")]
        public string ReportPath { get; set; }

        /// <summary>
        /// 是否为新报表数据
        /// </summary>
        [Column(TypeName = "bool")]
        public bool IsNew { get; set; }

        [Column(TypeName = "varchar(255)")]
        public string SyncStatus { get; set; }
    }

    //public enum EnumSyncStatus
    //{ 未上传 = 0, 排队上传中 = 5, 上传失败 = 15, 已上传待处理 = 10, 已同步 = 20, 处理失败 = 30 }
}